<?php

declare(strict_types=1);
/**
 * ApiBase基类
 */
namespace App\Controller\Core;
use App\Controller\AbstractController;

class ApiBaseController extends AbstractController
{
    public function index()
    {
        $user = $this->request->input('user', 'Hyperf112');
        $method = $this->request->getMethod();

        return [
            'method' => $method,
            'message' => "Hello {$user}.",
        ];
    }
    public function handlesuccess($result)
    {
        $result['code'] = 200;
        return $result;
    }

}
